<?php
//Disabled RSS Feed
function tmusic_disable_feed() {
wp_die( __('No feed available, please visit our <a href="'. get_bloginfo('url') .'">Home</a>!') );
}

add_action('do_feed', 'tmusic_disable_feed', 1);
add_action('do_feed_rdf', 'tmusic_disable_feed', 1);
add_action('do_feed_rss', 'tmusic_disable_feed', 1);
add_action('do_feed_rss2', 'tmusic_disable_feed', 1);
add_action('do_feed_atom', 'tmusic_disable_feed', 1);


remove_action( 'wp_head',             'feed_links',                    2     );
remove_action( 'wp_head',             'feed_links_extra',              3     );
remove_action( 'wp_head',             'rsd_link'                             );
remove_action( 'wp_head',             'wlwmanifest_link'                     );
remove_action( 'wp_head',             'index_rel_link'                       );
remove_action( 'wp_head',             'parent_post_rel_link',          10, 0 );
remove_action( 'wp_head',             'start_post_rel_link',           10, 0 );
remove_action( 'wp_head',             'adjacent_posts_rel_link_wp_head', 10, 0 );
remove_action( 'wp_head',             'locale_stylesheet'                    );
remove_action( 'publish_future_post', 'check_and_publish_future_post', 10, 1 );
remove_action( 'wp_head',             'wp_print_styles',               8     );
remove_action( 'wp_head',             'wp_print_head_scripts',         9     );
remove_action( 'wp_head',             'wp_generator'                         );
remove_action( 'wp_footer',           'wp_print_footer_scripts'              );
remove_action( 'wp_head',             'wp_shortlink_wp_head',          10, 0 );
remove_action( 'template_redirect',   'wp_shortlink_header',           11, 0 );

function tmusic_rm_generator_filter() { return ''; }
 
if (function_exists('add_filter')) {
	$types = array('html', 'xhtml', 'atom', 'rss2', /*'rdf',*/ 'comment', 'export');
	foreach ($types as $type){
		add_filter('get_the_generator_'.$type, 'tmusic_rm_generator_filter');
	}
}
 
?>